package com.ycx.ycxmybatismanagement.controller;

import com.ycx.ycxmybatismanagement.dto.PageDTO;
import com.ycx.ycxmybatismanagement.entity.OperateLog;
import com.ycx.ycxmybatismanagement.pojo.PageBean;
import com.ycx.ycxmybatismanagement.pojo.Result;
import com.ycx.ycxmybatismanagement.service.LogService;
import com.ycx.ycxmybatismanagement.vo.OperateLogVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class LogController {
    @Autowired
    private LogService logService;
    @GetMapping("/log/page")
    public Result<PageBean<OperateLogVO>> logPage(PageDTO pageDTO){
        System.out.println(pageDTO);
        PageBean<OperateLogVO> operateLogs = logService.logPage(pageDTO);
        return Result.success(operateLogs);
    }
}
